import { get, post } from "../http"

//获取套餐价格日历
export function getCalendar(package_id = 0, distributor_id = 0, secret = '') {
  let data = {
    package_id,
    distributor_id,
    secret,
  }
  return get({
    url: '/v1/order/booking/calendar',
    data
  })
}

//获取预定信息(默认传product_id，套餐过来的需要带package_id)
export function getBooking (idInfo={"product_id":0,"package_id":"", secret:""}) {
  return get({
    url: '/v1/order/booking/page',
    data:idInfo
  })
}

//获取出行人列表
export function getTravelersList () {
  return get({
    url: '/v1/order/travelers',
  })
}

//编辑出行人
export function travelerEdit (eidtInfo = { "id":0, "name": "", "phone": "", "identity_kind": "","identity_code": ""}) {
  return post({
    url: '/v1/order/traveler/edit',
    data:eidtInfo
  })
}

//删除出行人
export function travelerDel (id= 0 ) {
  return post({
    url: '/v1/order/traveler/del',
    data:{
        id
    }
  })
}

//下单
export function submitForm (formData = {} ) {
  return post({
    url: '/v1/order/submit',
    data:formData
  })
}